package com.ruoyi.coffee.domain;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.Builder;

/**
 * 订单详情对象 cf_order_items
 *
 * @author dxj
 * @date 2025-01-08
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("cf_order_items")
public class OrderItems extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 订单id
     */
    @Excel(name = "订单id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long orderId;

    /**
     * 产品id
     */
    @Excel(name = "产品id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long productId;

    /**
     * 购买数量
     */
    @Excel(name = "购买数量")
    private Integer quantity;

    /**
     * 单价（原价）
     */
    @Excel(name = "单价", readConverterExp = "原=价")
    private BigDecimal unitPrice;

    /**
     * 单个商品的优惠金额
     */
    @Excel(name = "单个商品的优惠金额")
    private String discount;

    /**
     * 单个商品的实际支付单价
     */
    @Excel(name = "单个商品的实际支付单价")
    private BigDecimal actualUnitPrice;

    /**
     * 咖啡属性
     */
    @Excel(name = "咖啡属性")
    private String coffeeAttributes;

    /**
     * 用户优惠券id
     */
    @Excel(name = "用户优惠券id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long userCouponId;


}
